package com.koocloud.electroplatemanage.mapper;

import com.koocloud.electroplatemanage.pojo.IncomePartJudgeFieldVo;
import com.koocloud.electroplatemanage.pojo.IncomePartJudgeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * @program: electroplatemanage
 * @description: 来料接收与判定字段Mapper接口
 * @author: zww
 * @create: 2020-10-10
 */
@Mapper
public interface IncomePartJudgeFieldMapper {
    //查询来料接收与判定表字段表启用字段数
    int selectCountEnableField();
    //查询来料接收与判定表字段表启用字段的相关信息(根据orderid排序)
    List<IncomePartJudgeFieldVo> selectEnableFieldInfo();
    //查询来料接收与判定表字段表启用字段的相关信息(根据orderid排序)
    List<IncomePartJudgeFieldVo> selectEnableFieldInfo1();
    //查询来料接收与判定表字段表非权限启用字段的相关信息(根据orderid排序)
    List<IncomePartJudgeFieldVo> selectEnableNotAuthFieldInfo();
    //查询当前
    int selectByFieldCode(String filedCode);
    //新增一条记录
    int insert(IncomePartJudgeFieldVo incomePartJudgeFieldVo);
    //逻辑删除一条记录
    int delete(@Param("fieldCode") String fieldCode, @Param("enableFlag") String enableFlag);
    //修改一条记录
    int update(IncomePartJudgeFieldVo incomePartJudgeFieldVo);
    //修改数据库orderId
    int updateOrderId(int orderId);
    //查询数据库最大orderId
    int selectFieldMaxOrderId();
    //根据map中的key获取对应列的数值 获取来料主表的总查询数据
    List<LinkedHashMap> selectDateByKey(@Param("sql") String sql);
    //查询字段表公式通过英文字段名称
    String selectFormulaByEnFieldName(String enFieldName);
    //查询来料接收与判定表字段表非权限启用字段的相关信息(根据orderid排序)
    List<IncomePartJudgeFieldVo> selectNotAuthEnableFieldInfo();
}
